//
//  QBWTFenLeiCell.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/19.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "QBWTFenLeiCell.h"

@implementation QBWTFenLeiCell
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
        [self layout];
    }
    return self;
}
- (void)initSubView{
    [self addSubview:self.nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.width.equalTo(@0).offset(170*fw);
        make.height.equalTo(@0).offset(40*fh);
        make.centerY.equalTo(self.mas_centerY);
    }];
    [self addSubview:self.lineView];
    [_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@0);
        make.right.equalTo(@0);
        make.bottom.equalTo(self.mas_bottom);
        make.height.equalTo(@1);
    }];

}
- (void)layout{
    
}
- (UIView *)lineView{
    if (!_lineView) {
        UIView *view = [[UIView alloc]init];
        view.backgroundColor = LINCOLOR;
        view.hidden = YES;
        _lineView = view;
    }
    return _lineView;
}
- (UILabel *)nameLabel{
    if (!_nameLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.text = @"未分类";
        label.textAlignment = 1;
        label.textColor = SELECTEDCOLOR;
        label.font = [UIFont systemFontOfSize:14];
        label.backgroundColor = [UIColorChange colorwithHexString:@"#EEEEEE"];
        label.layer.cornerRadius = 5;
        label.layer.masksToBounds = YES;
        _nameLabel = label;
    }
    return _nameLabel;
}
@end
